A computer system typically includes multiple devices that can store data, operating at different speeds, and it can be advantageous to store the most commonly used data in a fast location, referred to as “memory” or “main memory,” and other data in a slower location referred to as “storage.” An operating system (OS) is often able to move data between faster memory and slower storage, in a manner transparent to applications. Moving data from memory to storage is often referred to as “swapping out,” and moving data from storage to memory is referred to as “swapping in.” In some instances it may be desirable or necessary to prevent swapping out of portions of memory (e.g., to meet performance requirements, for security considerations, etc.).
A virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system (e.g., a server, a mainframe computer, etc.). The actual physical computer system is typically referred to as a “host machine,” and the operating system of the host machine is typically referred to as the “host operating system.”
A virtual machine may function as a self-contained platform, executing its own “guest” operating system and software applications. Typically, software on the host machine known as a “hypervisor” (or a “virtual machine monitor”) manages the execution of one or more virtual machines, providing a variety of functions such as virtualizing and allocating resources, context switching among virtual machines, etc.
Some virtualization platforms provide a feature known as “memory overcommit,” where the hypervisor may allocate memory to virtual machines that exceeds the amount of physical memory on the host machine. For example, a hypervisor executing on a server with 2 gigabytes of physical memory might allocate 1 gigabyte each to four virtual machines hosted by the server. In virtualized systems with memory overcommit, pages of memory may be swapped to and from storage (e.g., a storage device such as a magnetic hard disk, a Universal Serial Bus [USB] solid state drive, a Redundant Array of Independent Disks [RAID] system, a network attached storage [NAS] array, etc.) as necessary, in a manner similar to virtual memory in conventional non-virtualized computer systems.